package org.kgc.alanhealth.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName hospital_medical
 */
@Data
public class HospitalMedical implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 病人姓名
     */
    private String sickname;

    /**
     * 性别
     */
    private Integer gender;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 问诊时间
     */
    private Date interrogationtime;

    /**
     * 所属科室
     */
    private String office;

    /**
     * 病例描述
     */
    private String casedescription;

    /**
     * 病情诊断
     */
    private String diagnostics;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalMedical other = (HospitalMedical) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSickname() == null ? other.getSickname() == null : this.getSickname().equals(other.getSickname()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getInterrogationtime() == null ? other.getInterrogationtime() == null : this.getInterrogationtime().equals(other.getInterrogationtime()))
            && (this.getOffice() == null ? other.getOffice() == null : this.getOffice().equals(other.getOffice()))
            && (this.getCasedescription() == null ? other.getCasedescription() == null : this.getCasedescription().equals(other.getCasedescription()))
            && (this.getDiagnostics() == null ? other.getDiagnostics() == null : this.getDiagnostics().equals(other.getDiagnostics()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSickname() == null) ? 0 : getSickname().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getInterrogationtime() == null) ? 0 : getInterrogationtime().hashCode());
        result = prime * result + ((getOffice() == null) ? 0 : getOffice().hashCode());
        result = prime * result + ((getCasedescription() == null) ? 0 : getCasedescription().hashCode());
        result = prime * result + ((getDiagnostics() == null) ? 0 : getDiagnostics().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sickname=").append(sickname);
        sb.append(", gender=").append(gender);
        sb.append(", age=").append(age);
        sb.append(", interrogationtime=").append(interrogationtime);
        sb.append(", office=").append(office);
        sb.append(", casedescription=").append(casedescription);
        sb.append(", diagnostics=").append(diagnostics);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}